package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func ResponseJson(w http.ResponseWriter, code int, message map[string]interface{})  {
	w.Header().Set("Content-Type", "application/json")
	b, _ := json.Marshal(message)
	w.WriteHeader(code)
	w.Write(b)
	fmt.Fprint(w)
}
